import yaml
import json


def yaml_data_generator(file):
    with open(file, "r", encoding="utf8") as f:
        yaml_data = yaml.safe_load(f)
    for case_data in yaml_data:
        yield case_data


def json_data_generator(file):
    with open(file, "r", encoding="uff8") as f:
        json_data = json.load(f)

    for case_data in json_data:
        yield case_data
